﻿using UnityEngine;
using System.Collections;
using DG.Tweening;
using System;

namespace YoUI.Core.UIAnima
{
    [AddComponentMenu("YoUI/Anima/DoTweenRotate")]
    public class YoTweenRotate : YoTweenBase
    {
        public Vector3 from;
        public Vector3 to;

        public override Tweener Anima()
        {
           return rt.DORotate(to, duration);
        }

        protected override void Awake()
        {
            base.Awake();
            rt.Rotate(from);
        }
    }
}
